home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume18 / mush6.4 / part17 < prev    next >
Encoding:
Internet Message Format  |  1989-03-12  |  51.1 KB

  1. Subject:  v18i039:  Mail user's shell version 6.4, Part17/19
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Dan Heller <island!argv@sun.com>
  7. Posting-number: Volume 18, Issue 39
  8. Archive-name: mush6.4/part17
  9.  
  10.  
  11.  
  12. #! /bin/sh
  13. # This is a shell archive.  Remove anything before this line, then unpack
  14. # it by saving it into a file and typing "sh file".  To overwrite existing
  15. # files, type "sh file -c".  You can also feed this as standard input via
  16. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  17. # will see the following message at the end:
  18. #        "End of archive 17 (of 19)."
  19. # Contents:  mush.1.3
  20. # Wrapped by rsalz@papaya.bbn.com on Mon Mar 13 19:25:23 1989
  21. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  22. if test -f 'mush.1.3' -a "${1}" != "-c" ; then 
  23.   echo shar: Will not clobber existing file \"'mush.1.3'\"
  24. else
  25. echo shar: Extracting \"'mush.1.3'\" \(49215 characters\)
  26. sed "s/^X//" >'mush.1.3' <<'END_OF_FILE'
  27. Xand is reset each time the command
  28. X.BR cd 
  29. Xis called.
  30. XIt is referenced each time
  31. X.B pwd
  32. Xis called and may be used as any other shell variable.
  33. X.TP
  34. X.B date_received
  35. X(Boolean)
  36. XWhen message headers are printed, the date is normally shown is
  37. Xthe time and date the sender sent the message.  If this variable
  38. Xis set, then the date displayed is the date received.
  39. X.sp
  40. XWhen sorting messages by date, this variable is queried to determine
  41. Xwhether the messages should be sorted by date sent or date received.
  42. X.sp
  43. X\fBWarning:\fR For mailers that store messages \fIwithout\fR a line
  44. Xthat starts with \*QFrom \*U, this option does nothing.
  45. X.TP
  46. X.B dead
  47. X(String)
  48. XFile to use instead of dead.letter when interrupted mail is saved.
  49. XFor more information, see the variable
  50. X.B nosave.
  51. X.TP
  52. X.B dot
  53. X(Boolean)
  54. XAccepts a `.' on a line by itself, in addition to `^D', to terminate messages.
  55. X.TP
  56. X.B editor
  57. X(String)
  58. XEditor to use when \*Q~e\*U is specified.
  59. XDefault is the value of the variable
  60. X.BR visual .
  61. X.TP
  62. X.B escape
  63. X(Character)
  64. XWhen composing a mail message (not in an editor), and the
  65. X.B escape
  66. Xcharacter is the first character on the line, the next character
  67. Xis examined and a corresponding function associated with that
  68. X.I "escape command"
  69. Xis executed.
  70. XSee
  71. X.B "tilde escapes"
  72. Xfor more information.
  73. X.TP
  74. X.B folder
  75. X(String)
  76. XThe folder variable is set to a path where folders are kept.
  77. X\&~/Mail is the default value.
  78. X.TP
  79. X.B fortune
  80. X(Boolean/string)
  81. XIf fortune is set, a random fortune is appended to the end of
  82. Xall outgoing mail using the
  83. X.IR UNIX (TM)
  84. Xcommand
  85. X.B /usr/games/fortune
  86. X(may vary from system to system).
  87. XIf fortune is set to something that starts with
  88. Xa `\-', then it is interpreted as a flag to fortune (e.g., \*Q\-o\*U).
  89. XIf
  90. X.B fortune
  91. Xstarts with a `/', then the program described by
  92. Xthe string is executed (thus not doing fortune at all, if you want).
  93. XBy default,
  94. X.I "fortune \-s"
  95. X(short fortunes) is used.
  96. X.TP
  97. X.B fortunates
  98. X(String)
  99. XWhen fortunes are added to messages, sometimes it is desireable to
  100. Xmake sure that only a selected group of people get a fortune since
  101. Xcertain people may not understand the messages at the end of your
  102. Xmail.  Therefore, you can set a list of addresses (either pure addresses
  103. Xor aliases that are expanded to addresses) to be the only people who
  104. Xreceive fortunes if one is to be appended.  Therefore,
  105. Xif the To: and Cc: lines contain only address listed in this string
  106. Xvariable, then a fortune is appended to the message.
  107. XIf those lists contain names that are not on the fortunates
  108. Xlist, then no fortune is added.
  109. XThis cannot be overriden; using the
  110. Xtilde command \*Q~F\*U does not force a fortune to be added unless the
  111. Xindividuals on the recipient list are all included in the fortunates
  112. Xlist.  The list is made up of addresses or aliases separated by spaces or
  113. Xcommas.
  114. X.I "NOTE: fortune must be set in order for fortunates to work."
  115. X.TP
  116. X.B hdr_format
  117. X(String)
  118. XThis variable controls the format of the headers displayed by the
  119. X.B headers
  120. Xcommand and in the curses and graphics modes.
  121. XThe format style of this variable string is similar to printf in C.
  122. XWhen printing the information, the variable is evaluated and each
  123. Xcharacter in the string is echoed unless a `%' character is
  124. Xencountered.
  125. XIf one is found, the following string substitutions are made:
  126. X.sp
  127. X.in +2
  128. X.nf
  129. X.ta 0.5i
  130. X%a    address of the author
  131. X%c    number of characters (bytes) in the message
  132. X%f    entire \*QFrom:\*U field (author)
  133. X%l    number of lines in the message
  134. X%i    the message-id (may not be present)
  135. X%n    name of the author
  136. X%s    subject of the message
  137. X%t    \*QTo:\*U field (recipients)
  138. X%d    entire date of the message
  139. X%T    the time only of the message
  140. X%N    the day number of the month of the message
  141. X%W    the day of the week (Sun, Mon, etc.)
  142. X%M    the month name of the message
  143. X%Y    the year of the message
  144. X%y    the last two digits of %Y
  145. X\\n    a newline
  146. X\\t    a tab
  147. X.fi
  148. X.in -2
  149. X.sp
  150. XA field width specifier may be used in all options.
  151. XThus, \*Q%20f\*U will print the
  152. Xfirst 20 characters of the from line.
  153. XNo matter what the formatting string, the message number
  154. Xfollowed by a `>' (for current message) is printed.
  155. X.sp
  156. XThe \*Qaddress\*U and \*Qname\*U of the author
  157. Xare extracted from the \*QFrom:\*U field of the message.
  158. XThe name may be given in parentheses and
  159. Xthe rest of the line is the address, or the address is given in angle
  160. Xbrackets (`<' and `>') and the rest of the line is the name.
  161. XSometimes the address is the only thing on the line,
  162. Xin which case the name and address are the same.
  163. X.sp
  164. X.TP
  165. X.B history
  166. X(Numeric)
  167. XThis variable is set to the number of commands the shell interface
  168. Xwill remember.  It is just like the history variable used in
  169. X.I csh.
  170. XIf unset, the last command can always be referenced, but none other.
  171. X.TP
  172. X.B hold
  173. X(Boolean)
  174. XNormally, on termination of mail, read messages are saved in
  175. Xyour mbox (except those marked as preserved).
  176. XSetting
  177. X.B hold
  178. Xprevents this from happening,
  179. Xand messages remain in /usr/spool/mail/user.
  180. XThis does not apply to folders, obviously.
  181. X.TP
  182. X.B home
  183. X(String)
  184. XThis variable describes the user's home directory.
  185. XThe variable is initialized to the value of the environment variable HOME,
  186. Xbut can be modified at any time during the
  187. X.I Mush
  188. Xsession.
  189. XThe home directory is the same directory where temporary
  190. Xfiles are kept for editing and so forth.
  191. XIf the home directory cannot be found or read/write access is denied, an
  192. Xalternate directory, typically /tmp, is used.
  193. X.TP
  194. X.B hostname
  195. X(String)
  196. XThis is the name of your computer.  Currently, its sole usage is to
  197. Xcompose a correct \*QFrom:\*U line for use with Mail Transport Agents
  198. Xthat do not create this header automatically.  This will aid the
  199. Xrecipients of your mail in replying to your messages.
  200. X.sp
  201. XNote: the user should not have to set
  202. Xthis variable since it should be set automatically by the system.  However,
  203. Xit may happen that the system's hostname cannot be queried and the user may
  204. Xhave to set this variable manually.
  205. X.TP
  206. X.B ignore_bang
  207. X(Boolean)
  208. XIf set,
  209. X.I Mush
  210. Xwill ignore the `!' character as a history reference.
  211. X.TP
  212. X.B ignoreeof
  213. X(Boolean/string)
  214. XIf set, `^D' will not exit from
  215. X.IR Mush .
  216. XIf set to a string, that string is executed as a command
  217. Xwhen `^D' is typed.
  218. XThis does not effect termination of messages under the
  219. X.B mail
  220. Xand
  221. X.B reply
  222. Xcommands.
  223. X.TP
  224. X.B indent_str
  225. X(String)
  226. XWhen including messages into the text of a letter you are editing,
  227. Xeach line of the messages is preceded by the value of
  228. X.BR indent_str .
  229. XIf it is unset, the message body is indented by the string \*Q> \*U.
  230. XSee also the variables
  231. X.B pre_indent_str
  232. Xand
  233. X.BR post_indent_str .
  234. X.TP
  235. X.B in_reply_to
  236. X(String)
  237. XThis variable may be set to a string that will complete the
  238. Xheader \*QIn-Reply-To:\*U.
  239. XThe format of this string is identical to the options for the variable
  240. X.BR hdr_format .
  241. X.sp
  242. XFor example, if the user were to respond to a message
  243. Xfrom Dan Heller that was sent on October 21, 1987, at 10:39pm, with
  244. X.B in_reply_to
  245. Xset to the string
  246. X.nf
  247. X.in +2
  248. X.sp
  249. X%n's message as of %d.
  250. X.sp
  251. X.ti -2
  252. Xthe header line
  253. X.sp
  254. XIn-Reply-To: Dan Heller's message as of Oct 21, 1987, 10:39pm.
  255. X.in-2
  256. X.fi
  257. X.sp
  258. Xwould be added to the message.
  259. X.TP
  260. X.B keepsave
  261. X(Boolean)
  262. XIf set, the commands
  263. X.B save
  264. Xand
  265. X.B write
  266. Xwill
  267. X.I not
  268. Xmark messages for deletion.
  269. X.TP
  270. X.B known_hosts
  271. X(String)
  272. XUsed in conjunction with the variable
  273. X.BR auto_route ,
  274. Xthis variable is set to a list of hosts, separated by spaces, tabs,
  275. Xand/or commas, and describes
  276. Xthe hosts with whom you know your machine shares UUCP connections.
  277. XWhen replying to mail, many times you will see that the return path
  278. Xconstructed will have hostnames that your site could call, but instead
  279. Xthe mail has been routed through a number of different machines first.
  280. X.sp
  281. XFor example, if you respond to mail that would mail to the path
  282. X.sp
  283. X.ti +2
  284. Xunicom!pixar!root
  285. X.sp
  286. Xbut your know your machine already calls pixar, then sending the mail
  287. Xto unicom first is unnecessary.
  288. XIf you have set your known_hosts string to include pixar in its list,
  289. Xthe resulting address would look like
  290. X.sp
  291. X.ti +2
  292. Xpixar!root
  293. X.sp
  294. XAlso see the command
  295. X.B replyall
  296. Xfor more information on constructing correct return addresses.
  297. X.TP
  298. X.B lister
  299. X(String)
  300. XDefault arguments to the \*Qls\*U command for printing the
  301. Xcontents of a directory.
  302. X.TP
  303. X.B logfile
  304. X(String)
  305. XSet to a filename which logs the headers of outgoing messages.  The message
  306. Xbody of the message is not logged as it is for the
  307. X.B record
  308. Xfilename.  The logfile can be read as a folder to scan for the fact that
  309. Xmessages have been sent.  If \fBlogfile\fR and \fBrecord\fR are both set,
  310. Xthen the logfile and the record files will match exactly.  In this case,
  311. Xthe record file can be quickly scanned by scanning the log file instead.
  312. X.sp
  313. XIf set, but not to a string, the log file defaults to ~/mail.log.
  314. X.TP
  315. X.B mbox
  316. X(String)
  317. XSet to the pathname of a file you'd like mush to use as the default
  318. Xholder for read mail.
  319. XThe default is ~/mbox.
  320. X.TP
  321. X.B metoo
  322. X(Boolean)
  323. XWhen replying to mail, you are normally deleted from the list of
  324. Xrecipients.
  325. XIf metoo is set, you remain on the list.
  326. XSee the 
  327. X.B alternates
  328. Xcommand
  329. Xfor information on determining whether or not you're even on the list.
  330. X.TP
  331. X.B mil_time
  332. X(Boolean)
  333. XWhenever the time is displayed in a message header or in the prompt,
  334. Xit can be displayed in either 12-hour am/pm format, or in 24 hour
  335. Xmilitary time format.
  336. XThe default is the 12 hour format, but can be
  337. Xreset to use the 24 hour format by setting this variable.
  338. X.TP
  339. X.B newline
  340. X(Boolean/string)
  341. XIf set, carriage returns are ignored.
  342. XIf set to a string, that string is executed as a command when a
  343. Xcarriage return is typed.
  344. XOtherwise, carriage return prints the next undeleted message.
  345. X.TP
  346. X.B no_expand
  347. X(Boolean)
  348. XWhen a
  349. X.I Mush
  350. Xalias is used to reference a list of addresses, the list is expanded on
  351. Xthe To: and Cc: lines to indicate the complete list of all the recipients of
  352. Xthe message.
  353. XWhen no_expand is set, aliases are not expanded and the headers
  354. Xreflect the same information as typed by the user.
  355. X.TP
  356. X.B no_hdrs
  357. X(Boolean)
  358. XIf set, this variable tells 
  359. X.I Mush
  360. Xnot to include your personalized mail headers in messages.
  361. XThis does not unset your headers, it just disables them.
  362. X.TP
  363. X.B no_reverse
  364. X(Boolean)
  365. XIn curses mode and in the tool mode, reverse video is not used to indicate the 
  366. X.I "current message"
  367. Xif this variable is set.
  368. XIn the tool mode, if reverse video is not in use,
  369. Xtext is displayed in \*Qbold\*U.
  370. X.TP
  371. X.B nonobang
  372. X(Boolean)
  373. XIf this variable is set, history references that don't match anything will
  374. Xbe left unexpanded, rather than generating error messages.
  375. XThis is useful if you want argument referencing in cmd expansions, but do
  376. Xnot want to remember to escape every `!' you type in UUCP addresses.
  377. XIt is also recommended for use with curses mode, because history is not
  378. Xkept for line mode escapes from that interface.
  379. X.TP
  380. X.B nosave
  381. X(Boolean)
  382. XWhen composing a letter, the user can terminate the letter without sending
  383. Xit by using the tidle escape \*Q~q\*U or by sending two \*Qinterrupt\*U
  384. Xsignals.
  385. XWhen the message is terminated, a copy of it is saved to the
  386. Xfile \*Qdead.letter\*U in the user's home directory or to the file described
  387. Xby the variable
  388. X.BR dead .
  389. XIf the variable
  390. X.B nosave
  391. Xis set, then a backup copy of the message will not be saved.
  392. X.TP
  393. X.B pager
  394. X(String)
  395. XIf a message is longer than the number of lines that the variable
  396. X.B crt
  397. Xis set to, then this program is executed to view a message.
  398. XIf the user does not have this variable set, the user's environment PAGER
  399. Xis checked.
  400. XIf this isn't set, then the default value for pager (set up
  401. Xby the system manager) is used.
  402. XThis may or may not be the internal pager.
  403. XTo use the internal pager, you may set the variable pager to
  404. X.I internal
  405. Xor to a null string.
  406. X.TP
  407. X.B pre_indent_str
  408. X(String)
  409. XIf this variable is set, when including the body of a message into an outgoing
  410. Xmail message (using the \-i option to
  411. X.I reply
  412. Xor
  413. X.IR mail ,
  414. Xor when using the \*Q~i\*U escape),
  415. Xa line preceding the first line of
  416. Xincluded text is printed using the string value of the variable.
  417. XThis string uses the same printf style formatting characters as the
  418. X.B hdr_format
  419. Xvariable.
  420. XFor example, you could set
  421. X.B pre_indent_str
  422. Xas follows:
  423. X.sp
  424. X.ti +2
  425. Xset pre_indent_str = '[In the message entitled "%s", on %7d\\n %n writes:]'
  426. X.sp
  427. XYou can then include a message body using \*Q~i\*U, and you might
  428. Xget something like this:
  429. X.sp
  430. X.in +2
  431. X.nf
  432. X[In the message entitled "This is a test.", on Jan 19,
  433. X Dan Heller writes:]
  434. X> This is a test message to show how
  435. X> pre_indent_str might be used.
  436. X.ti -2
  437. X.sp
  438. X.fi
  439. XThis example assumes that the string value of
  440. X.B indent_str
  441. Xis not set.
  442. X.TP
  443. X.B post_indent_str
  444. X(String)
  445. XThis variable has the same function as
  446. X.B pre_indent_str
  447. Xexcept that the string is inserted into the message body
  448. X.I after
  449. Xthe text of the included message rather than before.
  450. XThe purpose of this variable is to complement the string described by
  451. Xthe variables
  452. X.B pre_indent_str
  453. Xand
  454. X.BR indent_str .
  455. XFor example,
  456. X.sp
  457. X.in +2
  458. X.nf
  459. Xset pre_indent_str = "/*"
  460. Xset indent_str = " * "
  461. Xset post_indent_str = " */"
  462. X.sp
  463. X.ti -2
  464. XAn included message might look something like this:
  465. X.sp
  466. X/*
  467. X * This is a test message to show how
  468. X * post_indent_str and pre_indent_str
  469. X * can work together with indent_str.
  470. X */
  471. X.fi
  472. X.in -2
  473. X.TP
  474. X.B printer
  475. X(String)
  476. XUsed to set the default printer for the lpr command.
  477. X.TP
  478. X.B print_cmd
  479. X(String)
  480. XThis string should describe a
  481. X.IR UNIX (TM)
  482. Xcommand other than "lpr" for sending
  483. Xmessages to the line printer.
  484. XSome people may choose to use a device independent
  485. Xtroff style program, but virtually any UNIX command will suffice.
  486. XCommon usage might include:
  487. X.sp
  488. X.ti +2
  489. Xset print_cmd = 'ptroff \-ms \-Plp'
  490. X.ti +2
  491. Xlpr .\-$
  492. X.sp
  493. XThis command would send all messages from the current message to the last
  494. Xmessage through the ptroff command, supplying the appropriate arguments.
  495. X.TP
  496. X.B prompt
  497. X(String)
  498. XYou can set your prompt to tell you many different pieces of information.
  499. XBy default, the prompt is set to the string
  500. X.sp
  501. X.ti +2
  502. X\*QMsg %m of %t: \*U
  503. X.sp
  504. XIf you have 10 messages and your current message is 5, then your prompt
  505. Xwould look like:
  506. X.sp
  507. X.ti +2
  508. XMsg 5 of 10:
  509. X.sp
  510. XThe string value that prompt is set to will be printed as your prompt.
  511. XIf the string contains a `%', then that character is
  512. Xignored, the next character is evaluated and an appropriate
  513. Xvalue is printed in its place:
  514. X.sp
  515. X.nf
  516. X.in +2
  517. X.ta 0.5i
  518. X%F    full path name of the current folder
  519. X%f    name of the current folder (tail of %F)
  520. X%m    \*Qcurrent message\*U number
  521. X%t    total number of messages
  522. X%n    number of \*Qnew\*U messages
  523. X%u    number of unread messages
  524. X%d    number of deleted messages
  525. X%T    current time (hours and seconds)
  526. X%N    today's date (Number of the day in the month)
  527. X%W    weekday name (Sun, Mon, Tue, ...)
  528. X%M    current month
  529. X%Y    this year
  530. X%y    last two digits of %Y
  531. X\\n    a newline
  532. X\\t    a tab
  533. X.fi
  534. X.in -2
  535. X.TP
  536. X.B quiet
  537. X(Boolean)
  538. XIf set, the currently running version of
  539. X.I Mush
  540. Xis not printed on startup.
  541. X.TP
  542. X.B realname
  543. X(String)
  544. XSet to the name of the user.  The name is initialized to the value of
  545. Xthe environment variable
  546. X.B NAME
  547. Xupon invocation of the program.
  548. XIf that isn't set, then the name is gotten from the password file if
  549. Xavailable.  If this variable wants to be reset or changed after the
  550. Xprogram has started, the user should issue the command:
  551. X.sp
  552. X.ti +2
  553. Xset realname = "Your name here"
  554. X.TP
  555. X.B record
  556. X(String)
  557. XSet to the name of a file to record all outgoing mail.
  558. XThis should be a full pathname or the current directory is searched.
  559. XThe pathname may begin with `+' (indicating the user's ~/Mail directory
  560. Xor the value of the 
  561. X.B folder
  562. Xvariable) or with a `~' (or \*Q~user\*U)
  563. Xindicating the user's home directory.
  564. X.TP
  565. X.B reply_to_hdr
  566. X(String)
  567. XWhen replying to mail,
  568. X.I Mush
  569. Xsearches for return paths from the message by searching for
  570. Xthe message headings \*QReply-to\*U, \*QReturn-path\*U, and \*QFrom:\*U,
  571. Xin that order.
  572. XIf none are found, then the first line of the
  573. Xmessage created by the delivery system is parsed and the address
  574. Xgiven there is used.  This special message header is created by most
  575. Xmail delivery programs, but not all of them (MMDF, for one).  This line
  576. Xis called the
  577. X.B From_
  578. Xheader because it is a colon-less header, but contains the return address
  579. Xof the author of the message.
  580. XIf the variable
  581. X.B reply_to_hdr
  582. Xis set to a list of headers (delimited by spaces or commas), then that list
  583. Xis searched.  If none of the headers listed in the variable exist
  584. Xin the message, then a warning message is printed and the default
  585. Xheaders are used.  The special case From_ header can be specified
  586. Xas one of the headers to search for.
  587. X.sp
  588. X.nf
  589. X.ti +2
  590. Xset reply_to_hdr = "sender reply-to return-path from_"
  591. X.fi
  592. X.sp
  593. XThis example shows that mush will search for (in order), the
  594. Xheaders listed in the reply_to_hdr variable.  If one header isn't
  595. Xfound, then mush looks for the next in the list.  If none of the
  596. Xheaders in the list are found, the default headers (mentioned
  597. Xabove) are searched.  The last header listed in the example is
  598. Xthe special "From " header.
  599. XAlso see the
  600. X.B reply
  601. Xcommand.
  602. X.TP
  603. X.B save_empty
  604. X(Boolean)
  605. XNormally, when all messages in a folder are deleted and the user updates
  606. Xthe folder or changes to a new folder, the empty folder is deleted.
  607. X.B save_empty
  608. Xprevents the folder from being deleted and it is left zero length.
  609. XNote: the main system mailbox is never deleted, even when empty.
  610. X.TP
  611. X.B screen
  612. X(Numeric)
  613. XMay be set to the number of message headers to display at a time in the
  614. Xline and curses modes.
  615. X.TP
  616. X.B screen_win
  617. X(Numeric)
  618. XMay be set to the number of message headers to display in the tool mode.
  619. XA subwindow is created for message headers, and its size is large
  620. Xenough to hold $screen_win headers.
  621. X.TP
  622. X.B sendmail
  623. X(String)
  624. XIf set, the program and arguments described by this variable will
  625. Xbe executed to actually deliver mail sent by
  626. X.I Mush.
  627. X.TP
  628. X.B show_deleted
  629. X(Boolean)
  630. XIf true, deleted message headers are displayed along with
  631. Xother messages (`*' indicates a deleted message) for the \fBheaders\fR
  632. Xcommand.  Also, deleted messages can be displayed using any command which
  633. Xdisplays a message.
  634. XIn curses mode, this variable is ignored and deleted messages are always
  635. Xdisplayed with other messages to facilitate undeleting messages.
  636. X.TP
  637. X.B show_hdrs
  638. X(String)
  639. XSet to a list (space and/or comma separated) of headers that are to be the
  640. Xonly headers displayed when viewing a message.
  641. XThis variable disables the headers suppressed by the
  642. X.B ignore
  643. Xcommand.
  644. XFor example,
  645. X.sp
  646. X.ti +2
  647. Xset show_hdrs = \*Qfrom date subject to cc\*U
  648. X.sp
  649. Xwill only display the headers
  650. X.B From: Date: Subject: To: Cc:
  651. Xin their entirety.
  652. X.TP
  653. X.B sort
  654. X(Boolean/string)
  655. XThe value of this variable is the same as the arguments to the
  656. X.B sort
  657. Xcommand.
  658. XThis variable is used for the initialization file to presort
  659. Xmail in the system mailbox upon entering mush.
  660. XSee the COMMANDS section for more information.
  661. X.TP
  662. X.B squeeze
  663. X(Boolean)
  664. XWhenever messages are read, piped, or saved, if this variable is set,
  665. Xall consecutive blank lines are squeezed into one blank line.
  666. X.TP
  667. X.B tmpdir
  668. X(String)
  669. XThis variable describes the path to use as the directory
  670. Xfor all tempfiles that
  671. X.I Mush
  672. Xuses.  By default, the user's home directory is used.  If that
  673. Xcannot be accessed, a directory writable by all is used (typically, /tmp).
  674. XIf \fBtmpdir\fR is set, then it is used first.
  675. X.TP
  676. X.B thisfolder
  677. X(Read-only string)
  678. XThe full path name of the current mailbox.
  679. XThis variable cannot be modified or displayed by the
  680. X.B set
  681. Xcommand; its value changes whenever a new folder is entered with the
  682. X.B folder
  683. Xcommand.
  684. XDuring sourcing of the initialization files,
  685. X.B thisfolder
  686. Xis not set, because the current folder has not yet been read.
  687. XIf you refer to \*Q$thisfolder\*U in an initialization file
  688. X.RI ( e.g. ,
  689. X.IR .mushrc ),
  690. Xbe sure to do so inside an \*Qif $?thisfolder\*U test.
  691. X.TP
  692. X.B toplines
  693. X(Numeric)
  694. XThe number of lines of a message to print when the
  695. X.B top
  696. Xcommand is issued.  If unset, $crt lines are printed.
  697. XNote that the message body only is printed when using the
  698. X.B top
  699. Xcommand; message headers are not counted as lines since they are not displayed.
  700. X.TP
  701. X.B unix
  702. X(Boolean)
  703. XIf set, commands that are not
  704. X.I Mush
  705. Xcommands are considered to be
  706. X.IR UNIX (TM)
  707. Xcommands.
  708. XThis removes the inconvenience of requiring the user to do
  709. Xshell escapes to do quick
  710. X.I UNIX
  711. Xcommands.
  712. XFor systems that support job control, SIGTSTP will stop the entire shell as
  713. Xwell as the process being executed.
  714. XWhen SIGCONT is delivered, both will receive the
  715. Xsignal and the shell will continue to wait for the job to finish.
  716. X.sp
  717. XDue to the lack of real job control, input/output redirection and UNIX command
  718. Xpiping, this mode of the shell is not intended to be used as a login shell.
  719. X.sp
  720. XIf a
  721. X.I Mush
  722. Xcommand conflicts with a
  723. X.I UNIX
  724. Xcommand, use the command
  725. X.B sh
  726. Xto force execution as a shell command or use the full pathname of the command
  727. X(e.g. starting with a '/').
  728. X.sp
  729. X.BR Warning :
  730. X.I "Be aware that Mush pipes transmit message lists, NOT TEXT."
  731. XYou cannot pipe the output of
  732. X.I UNIX
  733. Xcommands to or from
  734. X.I Mush
  735. Xcommands or other
  736. X.I UNIX
  737. Xcommands with the
  738. X.I Mush
  739. Xpipe mechanism.  You can, however, pipe mush commands to a final UNIX
  740. Xcommand (see the \fBpipe\fR command for more information).
  741. XUNIX commands should be simple commands without pipes or metacharacters.
  742. X.sp
  743. XThis feature is not available for the graphics (tool-based) mode.
  744. X.TP
  745. X.B verbose
  746. X(Boolean)
  747. XPasses verbose flag to mail delivery systems when sending mail.
  748. X.TP
  749. X.B verify
  750. X(Boolean)
  751. XWhen through editing messages, just before sending,
  752. X.B verify
  753. Xwill ask you if you want to send, continue editing, or abort the
  754. Xwhole message altogether.
  755. X.TP
  756. X.B visual
  757. X(String)
  758. XMay be set to the visual editor to use when ~v is specified.
  759. XDefault is vi.
  760. XThe visual editor is invoked by the \-e arguments to the
  761. Xcommands, 
  762. X.B respond
  763. Xand
  764. X.BR mail .
  765. X.TP
  766. X.B warning
  767. X(Boolean)
  768. XIf set, warning messages are printed when:
  769. X.in +4
  770. X.ti -2
  771. X\(bu a command line alias (\*Qcmd\*U) looks like a command.
  772. X.br
  773. XFor example,
  774. X.ti +2
  775. Xcmd mail 'set fortune; \\mail'
  776. X.ti +2
  777. Xcmd respond 'unset fortune; \\respond;'
  778. X.ti -2
  779. X\(bu a variable is set differently from its default value.
  780. X.br
  781. XFor example, if the escape character is set to something other
  782. Xthat the tilde (~), then a warning message will be printed.
  783. X.ti -2
  784. X\(bu a date format from a message is unknown.
  785. X.br
  786. XThe date of a message is taken from the \fBDate:\f header.
  787. XIf the date on that header is unknown, other headers are searched for a
  788. Xvalid date format until a legal one is found.
  789. XThis date may not be
  790. Xcorrect in that it was the date the message was received, not sent.
  791. X.in -4
  792. X.sp
  793. XThe intent is so that users who are used to their own environments
  794. Xwill be aware of changes in other environments should they be forced
  795. Xto use them.
  796. XThere may also be warning messages of failed routines
  797. Xor assertions that are not fatal enough to interrupt normal running
  798. Xof the program.
  799. X.TP
  800. X.B wrap
  801. X(Boolean)
  802. XNormally, when the last message is deleted, the current message
  803. Xpointer remains pointing to the last message and the user is done
  804. Xreviewing his mail.
  805. XIf the
  806. X.B wrap
  807. Xvariable is set, the current message pointer will wrap around to the
  808. Xbeginning of the user's messages again to the next undeleted message.
  809. XThis also applies to the
  810. X.B next
  811. Xcommand.
  812. X.TP
  813. X.B wrapcolumn
  814. X(Numeric)
  815. XMay be set to a column number at which line wrap will occur when
  816. Xcomposing messages.
  817. XIf set, but given no value, column 78 will be assumed.
  818. XWhen
  819. X.I Mush
  820. Xis able to determine the number of columns on your screen, it will
  821. Xenforce a maximum value for
  822. X.B wrapcolumn
  823. Xof two less than that number of columns.
  824. XLine wrapping can be disabled either by unsetting
  825. X.B wrapcolumn
  826. Xor by setting it with the explicit value of 0 (zero).
  827. X.sp
  828. XLine wrapping occurs only at whitespace (spaces or tabs).
  829. XLines containing no whitespace to the left of the specified column
  830. Xwill not be wrapped.
  831. XIf mush was started with the \-e option (echo mode), line wrapping
  832. Xcannot be done.
  833. X.SH MACROS
  834. XMacros are available in several different modes in
  835. X.IR Mush .
  836. X.I "Curses mode macros"
  837. Xare created by using the
  838. X.B bind
  839. Xcommand with the special function
  840. X.B macro
  841. X(or by using
  842. X.BR bind-macro ,
  843. Xwhich is synonymous).
  844. XThese macros are effective only when the curses interface is active.
  845. X.I "Line mode macros"
  846. Xare created with the
  847. X.B map
  848. Xcommand, and are effective only in the line-oriented command interface.
  849. XFinally,
  850. X.I "composition mode macros"
  851. Xare created with the
  852. X.B map!
  853. Xcommand, and are effective only when composing mail messages.
  854. XMacros are not available in the
  855. X.I tool
  856. Xmode; see, however, the
  857. X.B fkey
  858. Xcommand.
  859. XLine and composition mode macros are also nonfunctional when mush is
  860. Xstarted with the \-e (echo) option.
  861. X.PP
  862. XIn general, macros consist of two parts:  a
  863. X.I "key sequence"
  864. Xand an
  865. X.IR expansion .
  866. XThe
  867. X.B "key sequence"
  868. Xis the character or string of characters which, when typed in the
  869. Xappropriate mode, is recognized by
  870. X.I Mush
  871. Xas a reference to a macro.
  872. XThe
  873. X.B expansion
  874. Xpart of a macro is the string that will actually be \*Qseen\*U by
  875. X.I Mush
  876. Xwhen the key sequence is recognized.
  877. XMacros are like an interactive search-and-replace function;
  878. Xif a key sequence appears in the input, the associated expansion is
  879. Xsubstituted in its place.
  880. XThus, if you create a macro whose key sequence is \*Q^X^W\*U (control-X
  881. Xcontrol-W) and whose expansion is \*Qsave\*U, then when you hold down the
  882. Xcontrol key and type the two characters `x' and `w', the effect will be
  883. Xas if you had actually typed the four characters `s', `a', `v' and `e'.
  884. XThis is called \*Qexpanding\*U the macro.
  885. XMore detailed examples of macros will be presented in the subsections
  886. Xfor each mode in which macros can be used.
  887. X.PP
  888. XKey sequences are usually made up of control characters or special
  889. Xstrings of characters generated by \*Qfunction keys,\*U
  890. Xbut may in fact be almost any string the user desires.
  891. XKeys that generate a signal or an end-of-file from the keyboard
  892. X(for example, on BSD systems, control-Z generates a TSTP signal and
  893. Xcontrol-D generates an end-of-file) can never appear
  894. Xin key sequences, and macros in line or composition modes cannot
  895. X.I begin
  896. Xwith a newline, control-D, or any of the editing keys
  897. X(erase, word-erase, line-erase, etc.).
  898. XOtherwise, there are no restrictions.
  899. XIt should be kept in mind, however, that for the line and composition
  900. Xmodes, key sequences should be unusual characters or combinations of
  901. Xcharacters, not individual lower-case letters.
  902. XIf common characters or strings are used for key sequences, much
  903. Xconfusion can result when typing commands or messages.
  904. XThis is not important in the curses mode.
  905. X.PP
  906. XIn the line and composition modes, a
  907. X.I timeout
  908. Xis used for key recognition; that is, once the first character of the
  909. Xkey sequence has been typed, the succeeding characters must be typed
  910. Xafter it relatively quickly, or
  911. X.I Mush
  912. Xwill fail to recognize them as a continuous sequence.
  913. XIt is for this reason that key sequences are usually either very short,
  914. Xor are strings that are automatically generated by pressing a special
  915. Xkey on the terminal.
  916. XOn the other hand, the timeout can be used intentionally to prevent a
  917. Xmacro from being expanded; simply type the first character of the macro,
  918. Xthen wait for it to echo before typing the next.
  919. XThis does not work in curses mode, because curses macros
  920. Xnever \*Qtime out.\*U
  921. X.PP
  922. XIn any mode, macros are
  923. X.IR recursive ;
  924. Xthat is, if the
  925. X.I "key sequence"
  926. Xof one macro appears in the
  927. X.I expansion
  928. Xof another macro (or even of the same macro), the second key sequence
  929. Xwill be recognized when the first macro is expanded, and this new key
  930. Xsequence will also be expanded.
  931. XGreat care should be taken when creating macros to be certain that
  932. Xrecursive expansions do not happen unintentionally.
  933. XExpansion can be prevented in line or composition modes by using a
  934. X.I literal-next
  935. Xcharacter.
  936. X.PP
  937. XLiteral-next characters may be used from the keyboard or imbedded
  938. Xin expansions.
  939. XIn either case, they prevent the next character
  940. Xfrom being interpreted as part of a key sequence.
  941. X.I Mush
  942. Xrecognizes the literal-next character from the tty settings of the
  943. Xterminal, if the \*Qnew\*U BSD-style device driver is available;
  944. Xotherwise, `^V' (control-V) is recognized as a literal-next.
  945. XNote that, if you have a tty literal-next character,
  946. Xthen when typing you will need to type
  947. X.I two
  948. Xof them in order to send one to mush; this is because the tty
  949. Xdriver consumes the first one.
  950. XIt is not necessary to use two literal-nexts in macro expansions
  951. Xunless you wish to cause the second literal-next to be literal.
  952. X.PP
  953. XBackslash can be used as a literal-next when typing, and can
  954. Xsometimes be used as a literal-next in expansions; but use it
  955. Xwith caution, because it also introduces escape sequences
  956. X(see \*QMacro syntax,\*U below).
  957. XThere is no literal-next mechanism for curses mode.
  958. X.PP
  959. XA macro will always abort whenever
  960. X.I any
  961. Xcommand called by the macro returns an error.
  962. XThis includes recursive expansions, so no matter how often a macro has
  963. Xrecurred, it will be terminated completely.
  964. XErrors in curses mode include illegal cursor movements, such as up from
  965. Xthe top of the screen or down from the last message.
  966. X.PP
  967. X.BR "Macro syntax" .
  968. X.PP
  969. XA special sytax is provided for specifying control characters and other
  970. Xnon-printing characters in macro key sequences and expansions.
  971. XThis syntax is the same as that for bindings, discussed in the
  972. XCURSES INTERFACE section; it can be summarized as:
  973. X.ta 1.25i
  974. X.in +2
  975. X.nf
  976. X\\CX    control-X (where X is any capital letter)
  977. X\\E    the escape character
  978. X\\n    a newline (other C-style escapes also work)
  979. X.fi
  980. X.in -2
  981. X.sp
  982. XThus, to create a line mode macro for control-X control-W, as in the
  983. Xexample above, the command would be
  984. X.sp
  985. X.ti +4
  986. Xmap '\\CX\\CW' save
  987. X.PP
  988. XAlso provided is a syntax for executing functions from within macros.
  989. XThere are two special functions that are effective in all modes;
  990. Xthese are
  991. X.I getstr
  992. Xand
  993. X.IR getline .
  994. XBoth of these functions interrupt expansion of the current macro,
  995. Xand wait for a newline-terminated string to be entered from the
  996. Xstandard input.
  997. XThis input string is inserted into the macro expansion.
  998. XThe functions differ in that
  999. X.B getline
  1000. Xretains the newline character (carriage-return) at the end of the
  1001. Xinput string, whereas
  1002. X.B getstr
  1003. Xstrips off the newline (one must still be typed to terminate input).
  1004. XThese functions can be executed by surrounding their name with
  1005. Xsquare brackets
  1006. X.RB ( [ ,
  1007. X.BR ] );
  1008. Xfor example,
  1009. X.sp
  1010. X.ti +4
  1011. Xmap '\\CX\\CW' save [getline]
  1012. X.sp
  1013. Xcreates a line mode macro, which is expanded when control-X control-W is
  1014. Xtyped, and which displays \*Qsave\*U followed by a space and then waits
  1015. Xfor the user to type a line of input; the input line will be used as the
  1016. Xarguments to the save command.
  1017. X.PP
  1018. XAddtional functions are currently available only in the curses mode.
  1019. XHowever, the syntax of enclosing the function name in square brackets
  1020. Xapplies to all functions, regardless of mode.
  1021. XNote that
  1022. X.I ONLY
  1023. Xthe function name can appear in the brackets; no whitespace is allowed.
  1024. X.PP
  1025. X.BR "Curses mode macros" .
  1026. X.PP
  1027. XMacros in curses mode are the most versatile, because they can access the
  1028. Xfull range of curses commands quickly and easily.
  1029. XEvery character that appears in the expansion part of a curses mode macro
  1030. Xcan reference a curses command or another macro.
  1031. XLike other curses functions, curses mode macros are created with the
  1032. X.B bind
  1033. Xcommand.
  1034. XFor example, to sort your messages by date and then send the most recent
  1035. Xone to the printer, you could use
  1036. X.sp
  1037. X.ti +4
  1038. Xbind @ macro 'od$|'
  1039. X.sp
  1040. XWhen the `@' key is typed, this macro first invokes sort
  1041. X(`o' from the default bindings) and instructs it to use date (d)
  1042. Xfor sorting; it then moves the current-message pointer to the last
  1043. Xmessage ($) and prints that message (|).
  1044. X.PP
  1045. XAdmittedly, the above macro is somewhat cryptic, and is dependent upon
  1046. Xthe bindings for sort, last-msg, and lpr being set to the defaults.
  1047. XIt would be better, and possibly more understandable, to refer to the
  1048. Xdesired curses functions without using their key bindings.
  1049. XTo allow this, the \*Q[function]\*U syntax described above may be used
  1050. Xin curses mode macros to reference curses functions.
  1051. XThe only function that is prohibited from appearing in the \*Q[\|]\*U
  1052. Xis the special
  1053. X.I macro
  1054. Xfunction, which cannot be called when it has no binding.
  1055. XThe example macro can therefore be rewritten as
  1056. X.sp
  1057. X.ti +4
  1058. Xbind @ macro [sort]d[last-msg][lpr]
  1059. X.sp
  1060. XSuch references to curses functions may be made only in curses mode
  1061. Xmacros, and are effective only when mush is actually in curses mode.
  1062. XThat may sound strange, but the most common use of curses macros is
  1063. Xto quickly perform functions that require an escape to the line mode.
  1064. XFor example, although there is a variation of the curses mode
  1065. X.I mail
  1066. Xfunction that will prompt for additional flags, there is no function
  1067. Xto prompt for flags to be passed to
  1068. X.IR reply .
  1069. XA macro can easily be created to provide this:
  1070. X.sp
  1071. X.ti +4
  1072. Xbind R macro '[line-mode]reply '
  1073. X.sp
  1074. XThis macro binds `R' to perform an escape to line mode and type
  1075. Xthe string \*Qreply\*U followed by a space.
  1076. XMacro expansion then ends, leaving it up to the user to supply
  1077. Xflags to the command or to backspace over it if a different command
  1078. X(or none) is desired.
  1079. XOf course, the macro could also have provided some default arguments:
  1080. X.sp
  1081. X.ti +4
  1082. Xbind R macro '[line-mode]reply \-ei '
  1083. X.PP
  1084. XNote that, if the
  1085. X.B getline
  1086. Xor
  1087. X.B getstr
  1088. Xfunction is used in a line-mode escape, it is not possible to
  1089. Xerase the text that is typed before the
  1090. X.IR get ;
  1091. Xthat is, if the macro had been
  1092. X.sp
  1093. X.ti +4
  1094. Xbind R macro '[line-mode]reply \-ei [getline]'
  1095. X.sp
  1096. Xthen the user would be forced to use the \-ei flags.
  1097. X.PP
  1098. X.BR "Line mode macros" .
  1099. X.PP
  1100. XLine mode macros combine some of the convenience of single-keystroke
  1101. Xcommands with the versatility of the line-oriented text interface.
  1102. XAs has been noted, the choice of characters for line mode key sequences
  1103. Xshould be made carefully, so as not to interfere with normal typing.
  1104. XLine mode macros are created with the
  1105. X.B map
  1106. Xcommand; for example, suppose you frequently forward messages to a
  1107. Xfriend named \*Qfred.\*U  You could create a macro to do this:
  1108. X.sp
  1109. X.ti +4
  1110. Xmap '\\CF' 'mail \-f . fred\\n'
  1111. X.sp
  1112. XThis macro causes the single keystroke `^F' (control-F) to forward
  1113. Xthe current message to \*Qfred.\*U  Note the newline
  1114. Xcharacter \*Q\\n\*U at the end of the expansion;
  1115. Xthis causes the command to be executed immediately,
  1116. Xwithout you having to type a carriage-return.
  1117. X.PP
  1118. XThe expansion part of a line mode macro will echo to the screen when
  1119. Xit is expanded, so you can see what the macro is doing.
  1120. XYou can therefore use parts of the expansion as a \*Qprompt.\*U  In
  1121. Xthe above example, suppose you wished to enter a message list rather
  1122. Xthan always forwarding the current message.
  1123. XChange the macro to:
  1124. X.sp
  1125. X.ti +4
  1126. Xmap '\\CF' 'mail \-f [getstr] fred\\n'
  1127. X.sp
  1128. XThis version of the macro prints \*Qmail \-f\*U and a space, then waits
  1129. Xfor a newline-terminated string from the standard input.
  1130. XThe newline is stripped, and the string is used as the message list
  1131. Xpassed to the \*Qmail \-f\*U command.
  1132. XThe address \*Qfred\*U is also passed to
  1133. X.BR mail ,
  1134. Xso the messages in the list are forwarded to fred.
  1135. X.PP
  1136. XIf you want to be able to \*Qchange your mind\*U after starting a
  1137. Xline mode macro, you must leave the \*Q\\n\*U out of the expansion.
  1138. XWithout the newline, the macro will not be executed immediately, so
  1139. Xyou have a chance erase the line (or part of it) and type
  1140. Xsomething different.
  1141. XRemember that the
  1142. X.B getline
  1143. Xfunction keeps the newline in the string it gets, so if you don't
  1144. Xwant a newline to appear, you must use
  1145. X.BR getstr .
  1146. XWhen using the
  1147. X.I get
  1148. Xfunctions, you should also remember that you can
  1149. X.I never
  1150. Xbackspace past the \*Qbeginning\*U of a
  1151. X.BR getline ,
  1152. Xand you can backspace past the beginning of a
  1153. X.B getstr
  1154. Xonly after the get has been completed.
  1155. X.PP
  1156. XWhen the
  1157. X.B getstr
  1158. Xfunction is used in line mode macros,
  1159. X.I Mush
  1160. Xwill reprint the current input line so you can see what the whole
  1161. Xthing looks like, but will not redisplay the line mode prompt
  1162. X(see the entry for
  1163. X.B prompt
  1164. Xin the VARIABLES section for information on what the
  1165. Xprompt looks like).
  1166. XDon't let this worry you.
  1167. XThe input line is also reprinted when
  1168. X.B getline
  1169. Xis used, but the newline in the input string usually results in a
  1170. Xnew prompt being displayed.
  1171. X.PP
  1172. X.IR NOTE :
  1173. XLine mode macros are not available when using the line-mode escape
  1174. Xfunction in curses mode.
  1175. XIt is necessary to escape all the way to line mode (that is, leave
  1176. Xcurses mode by typing carriage-return at the `:' prompt) in order
  1177. Xto access line mode macros.
  1178. XThis is to prevent possible confusion when similar macros exist
  1179. Xin both line and curses modes.
  1180. X.PP
  1181. X.BR "Composition mode macros" .
  1182. X.PP
  1183. XComposition mode macros are very similar to line mode macros, and
  1184. Xprovide a \*Qpower typing\*U function when composing messages.
  1185. XFor example, you might want to have the word \*Qpercent\*U inserted
  1186. Xinto your message whenever you hit the `%' key:
  1187. X.sp
  1188. X.ti +4
  1189. Xmap! % percent
  1190. X.sp
  1191. XAnother use is to simulate the indentation features of editors.
  1192. XFor example, you might
  1193. X.sp
  1194. X.ti +4
  1195. Xmap! '\\CT' '\ \ \ \ '
  1196. X.sp
  1197. X(where the expansion is four spaces, enclosed in single quotes).
  1198. XThis macro causes four spaces to be inserted into the message whenever
  1199. Xcontrol-T is typed.
  1200. X.PP
  1201. XCompositon mode macros can also be used to execute
  1202. X.I tilde-escapes
  1203. X(see the GENERAL USAGE section for a list of these).
  1204. XFor example, you could create a macro to invoke the editor:
  1205. X.sp
  1206. X.ti +4
  1207. Xmap! '\\CE' '\\n~v\\n'
  1208. X.sp
  1209. XWhen control-E is typed, this macro prints a newline (to be sure that
  1210. Xthe tilde-escape is the first thing on a line), then types \*Q~v\*U
  1211. Xfollowed by another newline, to start the editor.
  1212. XSimilar macros can be created for other tilde-escapes.
  1213. X.PP
  1214. X.BR "Mixed mode macros" .
  1215. X.PP
  1216. XIt is not normally possible to mix macros among the different modes.
  1217. XHowever, once expansion has begun, it is interrupted only by an error
  1218. Xor by the appearance of one of the special
  1219. X.I get
  1220. Xfunctions.
  1221. XIt is therefore possible to have a macro expansion which causes
  1222. Xthe mode to change before the expansion has completed.
  1223. XIn this case, recursive expansions will apply to the new mode.
  1224. XSuppose we are using a variation of the editor-starting macro shown
  1225. Xabove for composition mode:
  1226. X.sp
  1227. X.ti +4
  1228. Xmap! '\\CE' '\\n~v emacs\\n'
  1229. X.sp
  1230. XThis macro causes the \*Qemacs\*U editor to be started when control-E
  1231. Xis typed in composition mode.
  1232. XWe can now create a line mode macro that makes use of this
  1233. Xcomposition mode macro:
  1234. X.sp
  1235. X.ti +4
  1236. Xmap '#' 'reply \-i [getline]~t[getline]\\CE'
  1237. X.sp
  1238. XWhen the `#' key is pressed in line mode, this macro will
  1239. Xprint \*Qreply \-i\*U and wait for a message list, then enter
  1240. Xcomposition mode (by executing the
  1241. X.B reply
  1242. Xcommand).
  1243. XIn composition mode, it will display the To: line
  1244. X(the \*Q~t\*U escape) and wait for other addresses to be added.
  1245. XFinally, it will recursively expand the control-E macro, to
  1246. Xstart editing the message with emacs.
  1247. X.PP
  1248. XAs can be seen from this example, the
  1249. X.I Mush
  1250. Xmacro facility is very powerful.
  1251. XBe very careful not to accidentally expand recursive macros,
  1252. Xespecially when using macros that change modes.
  1253. XWhen testing new macros, it is a good idea to start mush in
  1254. X.I read-only
  1255. Xmode (the \-r command line flag) to be sure that messages are
  1256. Xnot lost or altered.
  1257. X.PP
  1258. X.BR "Getting rid of macros" .
  1259. X.PP
  1260. XIt is not necessary to delete a macro in order to redefine it.
  1261. XNew expansions for existing key sequences will automatically replace
  1262. Xthe old expansions.
  1263. XIf it is necessary to remove a macro completely, the commands
  1264. X.BR unbind ,
  1265. X.B unmap
  1266. Xand
  1267. X.B unmap!
  1268. Xcan be used to remove curses mode, line mode, and composition mode
  1269. Xmacros, respectively.
  1270. XRemember to use a backslash or other literal-next character to prevent
  1271. Xthe expansion of line mode macros when using these commands, especially
  1272. X.BR unmap .
  1273. X.SH "MAIL ADDRESSES"
  1274. XWhenever a command that requires a user address or set of addresses
  1275. Xis specified
  1276. X.RB ( mail ,
  1277. X.BR reply ,
  1278. X.BR alias ,
  1279. X.BR etc )
  1280. Xthe addresses given must be separated by commas.
  1281. XMost casual users specify addresses that contain no comments or whitespace.
  1282. XThe simplest addresses are just the login names of the users you wish to send
  1283. Xyour message to:
  1284. X.sp
  1285. X.ti +2
  1286. X\fBmail\fR fred barney wilma betty
  1287. X.sp
  1288. XIn these cases,
  1289. X.I Mush
  1290. Xcan figure out that they are separate addresses and
  1291. Xinsert commas between addresses automatically.
  1292. X.sp
  1293. X.ti +2
  1294. XTo: fred, barney, wilma, betty
  1295. X.sp
  1296. XAddresses may also contain `!', `@' and `%' characters which are used
  1297. Xto separate hostnames and the final user name from each other.
  1298. XThis is primarily used to mail to users on other machines.
  1299. XUUCP addresses are specified as
  1300. X.sp
  1301. X.ti +2
  1302. Xhost1!host2!user
  1303. X.sp
  1304. Xwhere there may be as many hosts as necessary to route the message
  1305. Xto the recipient user.
  1306. XHere, the user's account is on \*Qhost2\*U
  1307. Xand that machine is connected to \*Qhost1\*U.
  1308. X.I Domain
  1309. Xaddresses (also called Arpanet, RFC822, and \*Qfully qualified\*U addresses)
  1310. Xare specified as
  1311. X.sp
  1312. X.ti +2
  1313. Xuser@host.domain
  1314. X.ti +2
  1315. Xuser%host2.domain@host1
  1316. X.sp
  1317. Xwhere \*Qdomain\*U is a domain name such as \*Q.berkeley.edu\*U or \*Q.com\*U.
  1318. XAs in the first example, the user is on \*Qhost2\*U, but that machine talks
  1319. Xto \*Qhost1\*U.
  1320. XIt is beyond the scope of this document to discuss in detail the ramifications
  1321. Xof internetwork mailing.
  1322. XMore information can be obtained through your system manager.
  1323. X.PP
  1324. X.I Mush
  1325. Xunderstands addresses containing a comment field.
  1326. XComment fields do not affect the destination address of mail being sent.
  1327. XThese fields are purely for
  1328. Xhuman legibility and may be specified according to the following constraints: 
  1329. X.sp
  1330. XAnything within angle brackets is an address; whatever is outside of the
  1331. Xaddress is considered a comment:
  1332. X.sp
  1333. X.ti +2
  1334. XDan Heller <sun!island!argv>
  1335. X.ti +2
  1336. XDan Heller <argv%island@sun.com>
  1337. X.sp
  1338. XAnything that has parentheses is a comment; whatever is outside of the
  1339. Xparentheses is considered the address:
  1340. X.sp
  1341. X.ti +2
  1342. Xsun!island!argv (Dan Heller)
  1343. X.ti +2
  1344. Xargv%island@sun.com (Dan Heller)
  1345. X.sp
  1346. XDouble quotes (") are treated just like parentheses:
  1347. X.sp
  1348. X.ti +2
  1349. X"Dan Heller" sun!island!argv
  1350. X.ti +2
  1351. X"Dan Heller" island!argv@sun.com
  1352. X.sp
  1353. XIf the comment is to contain a comma, the first case above may not be used;
  1354. Xyou must use either the parenthesis or double-quote cases.
  1355. X.sp
  1356. X.ti +2
  1357. Xfred@flintstone.bed.rock (Fred Flintstone, Cave Man)
  1358. X.sp
  1359. XIf the comment contains unbalanced quotes, unpredictable results may occur
  1360. X(Mush won't deliver the mail).
  1361. X.sp
  1362. XSince the angle brackets have the highest precedence, quotes or parentheses
  1363. Xmay be used in conjunction with one another.
  1364. X.sp
  1365. X.ti +2
  1366. XYabba Dabba Doo (Fred Flintstone) <fred>
  1367. X.ti +2
  1368. XScoobie "Doobie" Doo <scooby@shaggys.mystery.machine>
  1369. X.PP
  1370. XMultiple addresses may appear on a line:
  1371. X.sp
  1372. X.in +2
  1373. Xisland!argv@sun.com argv@garp.mit.edu dheller
  1374. X.in -2
  1375. X.sp
  1376. XBecause there is no indication of comments (parenthesis, angle bracket,
  1377. Xor quotes), it is assumed that these are separate addresses and mush will
  1378. Xinsert commas between these addresses accordingly.
  1379. XIt is for this reason that the user is encouraged to explicitly insert
  1380. Xcommas between all mail addresses and not depend on the automation of comma
  1381. Xinsertion to correctly separate addresses from one another.
  1382. X.PP
  1383. XMail aliases may contain addresses of the form described above.
  1384. X.sp
  1385. X.nf
  1386. X.in +2
  1387. X.ta 1.5i
  1388. Xalias george    George Jetson <george@spacely.space.sprockets>
  1389. Xalias jane    Jane Jetson <jane@sky-high.appts>
  1390. Xalias group    george, jane
  1391. X.in -2
  1392. X.fi
  1393. X.sp
  1394. XYou can mail using the alias as an address and it will be expanded
  1395. Xaccordingly.
  1396. XYou cannot, however, reference an alias and specify a
  1397. Xcomment or another address at the same time.
  1398. X.sp
  1399. X.ti +2
  1400. XTo: The Jetsons <group>
  1401. X.sp
  1402. XThe alias \*Qgroup\*U will not be expanded because the angle brackets
  1403. Xcauses it to be considered as another address entirely.
  1404. X.SH FILES
  1405. X.nf
  1406. X.ta 2.0i
  1407. X/usr/spool/mail/*    Directory for incoming mail
  1408. X~/Mail    Default \fBfolder\fR directory
  1409. X~/mbox    File where old mail is saved
  1410. X~/.mushrc    File giving initial \fIMush\fR commands
  1411. X~/.mailrc    Alternate initialization file
  1412. X~/.edXXXXXXX    Temporary for file for outgoing messages
  1413. X~/.mushXXXXXX    Temporary mail file (copy of current folder)
  1414. X.fi
  1415. X.PP
  1416. XTemporary files that are created by the program are always
  1417. Xcreated with read/write access to the owner only; group and other
  1418. Xpermissions are never set.
  1419. XThis is also true for the /usr/spool/mail/* files.
  1420. XAll other files created by the user via commands internal or external
  1421. Xto the program have permissions set by the user's default umask.
  1422. XIf the umask is reset within the program, the mask remains
  1423. Xintact even after exiting.
  1424. XRemember to set the variable
  1425. X.B unix
  1426. Xbefore attempting to set the umask value.
  1427. X.PP
  1428. XIf your system is using Sun Microsystem's NFS, take special note to
  1429. Xread the manual page for mount(1).
  1430. XFilesystems mounted for read/write
  1431. Xaccess should be mounted as \*Qhard\*U NFS mounts or you may lose
  1432. Xmailboxes during a timeout during a write or update.
  1433. X.PP
  1434. XFilesystems that use RFS still have bugs to be ironed out in the way
  1435. Xof owners and permissions concerning utime(2).
  1436. X.SH "SEE ALSO"
  1437. X.IR Mail (1),
  1438. X.IR binmail (1),
  1439. X.IR csh (1),
  1440. X.IR aliases (5),
  1441. X.IR mount (1),
  1442. X.IR mailaddr (7),
  1443. X.IR sendmail (8),
  1444. X.IR printf (3),
  1445. X.IR execl (3),
  1446. X.IR umask (1),
  1447. X.IR utime (2).
  1448. X.SH AUTHOR
  1449. XThe original
  1450. X.I Mush
  1451. Xwas written entirely by Dan Heller.
  1452. XCode to support macros, line wrapping, and some other miscellaneous
  1453. Xdetails, was written by Bart Schaefer, who gets his name in print
  1454. Xbecause he updated and proofread this manual.
  1455. XNumerous others have supplied valuable suggestions
  1456. Xand assorted bits and pieces.
  1457. X.PP
  1458. Xargv@spam.istc.sri.com       sun!island!argv
  1459. X.SH DISCLAIMERS
  1460. X.I Mush
  1461. Xcontains no
  1462. X.IR UNIX (TM)
  1463. Xsources and never has.
  1464. XIt is also not a modified version of any other mail user agent.
  1465. XSimilarities
  1466. Xwith any other mailer may have been designed for compatibility reasons.
  1467. X.PP
  1468. X.I UNIX
  1469. Xis a trademark of AT&T.
  1470. X.PP
  1471. XThe Flintstones and The Jetsons are trademarks of Hannah-Barbara Inc.
  1472. X.SH BUGS
  1473. XThe curses interface uses the curses library.
  1474. XThe routines from the library that are used are the most basic and simple
  1475. Xso as to avoid possible bugginess that
  1476. Xdifferent versions of UNIX might have.
  1477. XHowever, one unavoidable problem is the reverse video mode.
  1478. XDepending on your terminal,
  1479. Xthe termcap entry for it, and the version of curses you are running,
  1480. Xthe reverse video may makes things worse than desired.
  1481. XIn such situations, the user should set the variable
  1482. X.B no_reverse
  1483. Xto not get reverse video.
  1484. X\&`^R' may still be entered at runtime in the curses
  1485. Xinterface to toggle reverse video.
  1486. X.PP
  1487. XIf the program is already running and the system [later] has to swap
  1488. Xand there is no swap space left, there may be problems.
  1489. XOne such problem is sending mail.
  1490. XIf this happens, then sending mail
  1491. Xwill fail and a segmentation fault from the spawned/forked child will occur
  1492. Xunless the -v flag was given to mail.
  1493. XThe unsent letter will not be removed from the editing file ($home/.edXXXXXX)
  1494. Xand may be recovered.
  1495. X.PP
  1496. XMany functions available to the line oriented mode (shell mode)
  1497. Xare not available to the tool mode.
  1498. XFor example,
  1499. X.B pick
  1500. Xmay not be directly accessed although experienced users may find that
  1501. Xtyping pick commands within single backquotes in the \*Qrange\*U panel item
  1502. Xin the header window will indeed pick messages.
  1503. XThis is mostly for selecting the \*Qdelete range\*U item
  1504. Xor the middle mouse button icon in the header panel.
  1505. X.PP
  1506. XShell escapes (of any kind) may not be called from
  1507. Xthe tool/graphics mode.
  1508. XThe reason for this is that there is no tty
  1509. X.I window
  1510. Xto run commands from.
  1511. XIt is impossible to determine whether or not the user wants to run an
  1512. Xinteractive program or not, so it is best to disallow its usage all together.
  1513. XThe experienced window user
  1514. Xcan figure out how to really do shell layers from within the tool mode.
  1515. X.PP
  1516. XToggling from the curses mode to the line mode to get the full
  1517. Xfunctionality of the shell/line mode is unfortunately necessary
  1518. Xin the name of \*Quser friendliness.\*U
  1519. XMostly, this is only necessary
  1520. Xfor piping of commands and using the pick command.
  1521. X.PP
  1522. XThe function keys and their ability to
  1523. X.I work
  1524. Xhas been variable depending on the version of SunWindows/SunView
  1525. Xyour Sun Workstation has.  From time to time, it works, but when it
  1526. Xdoesn't, it seems to be related to other user or system definable
  1527. Xdot-files or whatever.
  1528. XI hardly use them, so I haven't had a chance
  1529. Xto really debug that part much.
  1530. XMy experiences have shown them to
  1531. Xwork in Sun versions 2.0, 2.2, and 3.3, but not any other version.
  1532. X.PP
  1533. XWhen using
  1534. X.B vi
  1535. Xin the tool/graphics mode, periodically the window will be one
  1536. Xline \*Qshort.\*U
  1537. XThat is, scrolling will be off by one line and you may
  1538. Xhave to redraw the window (using \*Qz.\*U in vi) to get it in sync again.
  1539. XThis is a known problem with SunWindows, but Sun refuses to fix it
  1540. Xas SunWindows are \*Qobsolete.\*U
  1541. X.PP
  1542. XWhen running on full filesystems,
  1543. X.I Mush
  1544. Xmay complain or not even run since it needs temporary space with which
  1545. Xto work.
  1546. XInstead of finding new filesystems on its own,
  1547. X.I Mush
  1548. Xleaves this task up to the user.
  1549. XThe workaround is to set the variable
  1550. X.B tmpdir
  1551. Xin the initialization file to be a writable place in a filesystem that
  1552. Xhas enough disk space.
  1553. X.PP
  1554. XMost of the other known and documented bugs
  1555. Xare in the supplied README file accompanying the source.
  1556. XOf course, the source is an excellent place to look as most known bugs are
  1557. Xdocumented right in the source code.
  1558. XA good way to track suspicious bugs is to use the
  1559. X.B debug
  1560. Xcommand, but note that
  1561. Xthis command is very difficult to use in curses mode.
  1562. END_OF_FILE
  1563. if test 49215 -ne `wc -c <'mush.1.3'`; then
  1564.     echo shar: \"'mush.1.3'\" unpacked with wrong size!
  1565. fi
  1566. # end of 'mush.1.3'
  1567. fi
  1568. echo shar: End of archive 17 \(of 19\).
  1569. cp /dev/null ark17isdone
  1570. MISSING=""
  1571. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
  1572.     if test ! -f ark${I}isdone ; then
  1573.     MISSING="${MISSING} ${I}"
  1574.     fi
  1575. done
  1576. if test "${MISSING}" = "" ; then
  1577.     echo You have unpacked all 19 archives.
  1578.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1579. else
  1580.     echo You still need to unpack the following archives:
  1581.     echo "        " ${MISSING}
  1582. fi
  1583. ##  End of shell archive.
  1584. exit 0
  1585.